﻿using System.Data.Entity.ModelConfiguration;

namespace JHT.EFMigrationTest.ClassLibrary1
{
    internal class ClassInfoMap : EntityTypeConfiguration<ClassInfo>
    {
        public ClassInfoMap()
        {
            ToTable("ClassInfo");

            this.HasKey(p => p.Id);
            this.Property(p => p.Id).HasColumnName("Id").HasColumnType("bigint").IsRequired().HasDatabaseGeneratedOption(System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedOption.Identity);
            this.Property(p => p.ClassName).IsRequired().HasColumnType("varchar").HasColumnName("ClassName").HasMaxLength(50);

        }
    }
}